#include <stdio.h>
#include <unistd.h>

int main()
{
  printf("command begin..\n");
  char* argv[] = {"ls","-a","-l","-i",NULL};
  char* envp[] = {"PATH=/usr/bin","TERM=console",NULL};
//  //参数采用列表
//  execl("/usr/bin/ls","ls","-a","-l","-i",NULL);
//  //参数采用数组
//  execv("/usr/bin/ls",argv);
//  //自动搜索环境变量，不用输入全路径
//  execlp("ls","ls","-a","-l","-i",NULL);
//  execvp("ls",argv);
//  //自己配置环境变量
//  execle("ls","ls","-a","-i",NULL,envp);
//  execve("/usr/bin/ls",argv,envp);
  printf("command end..\n");
  return 0;
}
